package com.forte.cartservice;

import com.forte.cartdao.Cart;
import com.forte.cartdao.CartProduct;
import com.forte.exception.InvalidParameterException;
import com.forte.productdao.Product;
import com.forte.shoppingcustomerdao.ShoppingCustomer;

public interface CartService {
	
	void addToCart(Cart cart, Product product, int quantity) throws InvalidParameterException;
	void saveOrUpdate(ShoppingCustomer customer);
	void saveOrUpdate(CartProduct cartProduct);
	void saveOrUpdate(Cart cart);
	Cart findCartById(int userId);
	Cart findCartByCartId(int cartId);
	CartProduct findCartAndProductInCartProduct(int userId, int productId);
	void removeProductFromCart(Cart cart, Product product);
	void changeProductQuantityInCart(Cart cart, Product product,int quantity) throws InvalidParameterException;	
	double computeTotalValue(Cart cart);
}
